<?php

use yii\widgets\ActiveForm;
use yii\helpers\Url;
?>

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="format-detection" content="telephone=no" />
  <link href="/css/style.css" rel="stylesheet">
 <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>

 <script src="/js/mobiscroll.custom.min.js"></script>
    <link href="/css/mobiscroll.custom.min.css" rel="stylesheet" type="text/css" />
</head>
<body>

    <div class="registration-form">
         
        <div class="registration-form">
         
        
        <?php $form = ActiveForm::begin(['id'=>'form111']); ?>
 <div  id="traffic2" class="view wapper">
        <img class="jt" src="/img/jt.png" style="width: 100px;position: absolute;left: 50%;margin-left: -50px;margin-top: -10px;">

	<ul style="margin-top:4%">
		

		<li>

                <span>返程方式</span>
                <input type="hidden" name="Registration[back_transportation]" value="">
                    <input type="radio" name="Registration[back_transportation]" value="飞机" <?= $model->back_transportation=='飞机'?'checked':''?>> <span>飞机</span>
                   <input type="radio" name="Registration[back_transportation]" value="火车" <?= $model->back_transportation=='火车'?'checked':''?>> <span>火车</span>
                   <input type="radio" name="Registration[back_transportation]" value="自驾" <?= $model->back_transportation=='自驾'?'checked':''?>> <span>自驾</span>

		</li>
		<li>
             <span>返程抵达城市</span>
                <input type="text" id="arrived_city" name="Registration[arrived_city]"   value="<?= $model->arrived_city?>">
					
		</li>
		<li>
                <span>返程出发地点</span>
					                <select id="registration-arrival_location" name="Registration[arrival_location]" aria-invalid="false">
							<option value="上海浦东国际机场T2航站楼" <?= $model->arrival_location=='上海浦东国际机场T2航站楼'?'selected':''?>>上海浦东国际机场T2航站楼</option>
							<option value="上海浦东国际机场T1航站楼" <?= $model->arrival_location=='上海浦东国际机场T1航站楼'?'selected':''?>>上海浦东国际机场T1航站楼</option>
							<option value="南京禄口国际机场T2航站楼" <?= $model->arrival_location=='南京禄口国际机场T2航站楼'?'selected':''?>>南京禄口国际机场T2航站楼</option>
							<option value="南京路口浦东国际机场T1航站楼" <?= $model->arrival_location=='南京禄口国际机场T1航站楼'?'selected':''?>>南京禄口国际机场T1航站楼</option>
							<option value="南京站" <?= $model->arrival_location=='南京站'?'selected':''?>>南京站</option>
							<option value="南京南站" <?= $model->arrival_location=='南京南站'?'selected':''?>>南京南站</option>
		       </select>

		</li>
		
		<li>
                <span>返程航班号/车次</span>
					<input type="text" id="back_flight_number"  name="Registration[back_flight_number]" value="<?= $model->back_flight_number?>">
		</li>
		
		<li>

                <span>返程出发时间</span>
				
					
				<input type="text" id="demo_datetime" name="Registration[departure_time]"  readonly="readonly" value="<?= $model->departure_time?>"  />
			
		</li>
		<li>

            <span>是否送机</span>
            <input type="hidden" name="Registration[is_send]" value="">
            <input type="radio" name="Registration[is_send]" value="是" <?= $model->is_send=='是'?'checked':''?>> <span>是</span>
            <input type="radio" name="Registration[is_send]" value="否" <?= $model->is_send=='否'?'checked':''?>> <span>否</span>

		</li>
	</ul>
</div>
        <a href="<?=Url::to(['summit/traffic','code'=>$model->invitation_code])?>">  
         <input id="pre" style="" value="" type="button">
        </a> 
         
        <input id="next" style="" value="" type="button">
		 



 <?php ActiveForm::end(); ?>
        
          
        
    </div>
         
          
        
    </div>

</body>
</html>
<script>
$('#next').click(function(){
	
	
	var tans=$("input[name='Registration[back_transportation]']:checked").val();
	if(tans=='自驾'){
		
		
	}else{
		var arrived_city=$('#arrived_city').val();if(arrived_city==''){alert('请填写返程抵达城市');return false;}
	var departure_time=$('#departure_time').val();if(departure_time==''){alert('请填写返程出发时间');return false;}
	var back_flight_number=$('#back_flight_number').val();if(back_flight_number==''){alert('请填写返程航班号/车次');return false;}
		
		
		
	}
	
	

	
	//var arrival_time=$('#arrival_time').val();if(arrival_time==''){alert('请填写抵达时间');return false;}
	$('#form111').submit();
	
	
})

 var theme= "bootstrap";
        var mode = "scroller";
        var display = "bottom";
        var lang="zh";
 $('#demo_datetime').mobiscroll().datetime({
            theme: theme,
            mode: mode,
            display: display,
            lang: lang,
            dateFormat:"yyyy-mm-dd",
            minDate: new Date(2018,4,11,0,0),
            maxDate: new Date(2018,4,13,23,59),
            stepMinute: 1
        });




</script>